import request from '@/utils/request'
//帖子方法api

//获取内容贴
export function GetContents(data) {
  return request({
    url: '/Topic/GetContents',
    method: 'get',
    params: data
  })
}


//标记已读贴

export function topicState(data) {
  return request({
    url: '/Concern/TopicState',
    method: 'post',
    data: data
  })
}

//留下脚印(收藏)
export function collect(data) {
  return request({
    url: '/Topic/collect',
    method: 'post',
    data
  })
}

//回帖初始化数据(未关注人,复制链接,最近4个回复)
export function replyLoadData(params) {
  return request({
    url: '/AboutMessage/replyLoadData',
    method: 'get',
    params
  })
}

/**邀请用户回答问题 */
export function invite(data) {
  return request({
    url: '/AboutMessage/invite',
    method: 'post',
    data
  })
}

/**删除当前回复 */
export function deleteReply(data) {
  return request({
    url: '/Topic/deleteReply',
    method: 'delete',
    data
  })
}


/**结贴 */
export function finishTopic(data) {
  return request({
    url: '/Topic/finishTopic',
    method: 'post',
    data
  })
}

/**转为公告贴 */
export function trunnotice(data) {
  return request({
    url: '/Topic/trunnotice',
    method: 'put',
    data
  })
}

/**下载文件 */
export function downFile(params) {
  return request({
    url: '/AboutMessage/downFile',
    method: 'get',
    params
  })
}

// Topic/updatetitle 修改标题  

export function updateTitle(data) {
  return request({
    url: '/Topic/updatetitle',
    method: 'put',
    data
  })
}


/**查看帖子回复状态 */
export function lookTopic(params) {
  return request({
    url: '/Topic/lookTopic',
    method: 'get',
    params
  })
}

/**邀请客户 */
export function getCustomers(params) {
  return request({
    url: '/User/getCustomers',
    method: 'get',
    params
  })
}

/**客户允许跳转 */
export function checkjump(params) {
  return request({
    url: '/Topic/checkjump',
    method: 'get',
    params
  })
}